Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Scripting Additions Guide /
Chapter 2 - Scripting Addition Commands


Scripting Addition Files

The standard scripting addition files are copied into the Scripting Additions folder (located in the Extensions folder in the System Folder) when you install AppleScript according to the instructions in Getting Started With AppleScript. Each file provides one or more commands. Table 2-1 summarizes the commands provided by the standard scripting additions.

Each scripting addition that provides commands includes its own dictionary of the commands and object classes it defines. You can open a scripting addition's dictionary in much the same way you open an application's dictionary--
by selecting the scripting addition's icon in the Scripting Additions folder, dragging the icon over the Script Editor's icon, and releasing the mouse button.

For information about commands provided by scripting additions other than those described in this manual, see the documentation for those scripting additions. For information about using command definitions and for definitions of AppleScript commands and standard application commands, see the AppleScript Language Guide.
Table 2-1 Scripting addition commands described in this guide
Name of
scripting addition file
Name of commandDescription of command
Not a separate file; part of AppleScript extensionActivateActivates an application.
LogPlaces a string between comment characters in the Script Editor's
Event Log Window.
Start LogTurns logging on in the Script Editor's Event Log window.
Stop LogTurns logging off in the Script Editor's Event Log window.
BeepBeepPlays the alert sound.
Choose ApplicationChoose ApplicationAllows the user to choose a running application from a dialog box.
Choose FileChoose FileAllows the user to choose a file from
a dialog box.
 Choose FolderAllows the user to choose a folder
or volume from a dialog box.
Current DateCurrent DateReturns a date value that represents
the current time and date.
Display DialogDisplay DialogDisplays a dialog box.
File CommandsInfo ForGets information for a file or folder.
 List DisksReturns a list of currently
mounted disks.
 List FolderLists the contents of a specified folder.
 Path ToReturns full pathname to specified folder or application.
 
Load ScriptLoad ScriptLoads a compiled script into the current script as a script object.
New FileNew FileAllows a user to create a new file.
NumericsRandom NumberGenerates a random number.
 RoundRounds a number to the nearest integer.
Read/Write CommandsClose AccessCloses a file opened with Open
for Access.
 Get EOFReturns the offset, in bytes, of the end
of a specified file from the beginning
of the file.
 Open for AccessOpens a file for reading or writing using Read or Write commands.
 ReadReads data from file previously opened with Open for Access command, or opens file for access, reads data, and closes file.
 Set EOFSets the end of a specified file.
 WriteWrites data to file previously opened with Open for Access command, or opens file for access, writes data, and closes file.
Run Script Run ScriptRuns a specified script.
Scripting ComponentsScripting ComponentsReturns a list of the scripting components currently available.
Store ScriptStore ScriptStores a specified script object in a specified file.
 
String CommandsASCII CharacterConverts a number to its
ASCII equivalent.
 ASCII NumberReturns the ASCII number
of a character.
 OffsetDetermines the offset of a string
within another string.
Time to GMTTime to GMTReturns the difference, in seconds, between the current time and Greenwich mean time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
18 DEC 1996